package lab1;

import java.util.Scanner;
import java.util.Random;

public class Test08 {
    public static void main(String[] args) {
        int x = new Random().nextInt(100) + 1;
        System.out.println("please input a number");
        int input;
        do {
            input = new Scanner(System.in).nextInt();
            if (input < x) {
                System.out.println("猜小了 ");
            }
            if (input > x) {
                System.out.println("猜大了");
            }
            if (input == x) {
                System.out.println("猜对了");
                break;
            }
        } while (input != x);

    }
}
